<!doctype html>

<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>mediamodel.js (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
  </script>

  <script src="static/js/doc.js">
  </script>

  <meta charset="utf8">
</head>

<body onload="prettyPrint()">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>

<div class="clear"></div>

<h2><a href="closure_goog_ui_media_mediamodel.js.html">mediamodel.js</a></h2>

<pre class="prettyprint lang-js">
<a name="line1"></a>// Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
<a name="line2"></a>// you may not use this file except in compliance with the License.
<a name="line3"></a>// You may obtain a copy of the License at
<a name="line4"></a>//
<a name="line5"></a>//     http://www.apache.org/licenses/LICENSE-2.0
<a name="line6"></a>//
<a name="line7"></a>// Unless required by applicable law or agreed to in writing, software
<a name="line8"></a>// distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
<a name="line9"></a>// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
<a name="line10"></a>// See the License for the specific language governing permissions and
<a name="line11"></a>// limitations under the License.
<a name="line12"></a>
<a name="line13"></a>// Copyright 2009 Google Inc. All Rights Reserved.
<a name="line14"></a>
<a name="line15"></a>/**
<a name="line16"></a> * @fileoverview Provides the base media model consistent with the Yahoo Media
<a name="line17"></a> * RSS specification {@link http://search.yahoo.com/mrss/}.
<a name="line18"></a> */
<a name="line19"></a>
<a name="line20"></a>goog.provide(&#39;goog.ui.media.MediaModel&#39;);
<a name="line21"></a>goog.provide(&#39;goog.ui.media.MediaModel.Category&#39;);
<a name="line22"></a>goog.provide(&#39;goog.ui.media.MediaModel.MimeType&#39;);
<a name="line23"></a>goog.provide(&#39;goog.ui.media.MediaModel.Player&#39;);
<a name="line24"></a>goog.provide(&#39;goog.ui.media.MediaModel.Thumbnail&#39;);
<a name="line25"></a>
<a name="line26"></a>
<a name="line27"></a>/**
<a name="line28"></a> * An base data value class for all media data models.
<a name="line29"></a> *
<a name="line30"></a> * MediaModels are exact matches to the fields defined in the Yahoo RSS media
<a name="line31"></a> * specification {@link http://search.yahoo.com/mrss/}.
<a name="line32"></a> *
<a name="line33"></a> * The current common data shared by medias is to have URLs, mime types,
<a name="line34"></a> * captions, descriptions, thumbnails and players. Some of these may not be
<a name="line35"></a> * available, or applications may not want to render them, so {@code null}
<a name="line36"></a> * values are allowed. {@code goog.ui.media.MediaRenderer} checks whether the
<a name="line37"></a> * values are available before creating DOMs for them.
<a name="line38"></a> *
<a name="line39"></a> * TODO: support asynchronous data models by subclassing
<a name="line40"></a> * {@link goog.events.EventTarget} or {@link goog.ds.DataNode}. Understand why
<a name="line41"></a> * {@link fava.data.Node} is under fava, and not available in closure. Add
<a name="line42"></a> * setters to MediaModel once this is supported.
<a name="line43"></a> *
<a name="line44"></a> * @param {string} opt_url An optional URL of the media.
<a name="line45"></a> * @param {string} opt_caption An optional caption of the media.
<a name="line46"></a> * @param {string} opt_description An optional description of the media.
<a name="line47"></a> * @param {goog.ui.media.MediaModel.MimeType} opt_type The type of the media.
<a name="line48"></a> * @param {goog.ui.media.MediaModel.Medium} opt_medium The medium of the media.
<a name="line49"></a> * @constructor
<a name="line50"></a> */
<a name="line51"></a>goog.ui.media.MediaModel = function(opt_url,
<a name="line52"></a>                                    opt_caption,
<a name="line53"></a>                                    opt_description,
<a name="line54"></a>                                    opt_type,
<a name="line55"></a>                                    opt_medium) {
<a name="line56"></a>  /**
<a name="line57"></a>   * The URL of the media.
<a name="line58"></a>   * @type {string|undefined}
<a name="line59"></a>   * @private
<a name="line60"></a>   */
<a name="line61"></a>  this.url_ = opt_url;
<a name="line62"></a>
<a name="line63"></a>  /**
<a name="line64"></a>   * The caption of the media.
<a name="line65"></a>   * @type {string|undefined}
<a name="line66"></a>   * @private
<a name="line67"></a>   */
<a name="line68"></a>  this.caption_ = opt_caption;
<a name="line69"></a>
<a name="line70"></a>  /**
<a name="line71"></a>   * A description of the media, typically user generated comments about it.
<a name="line72"></a>   * @type {string|undefined}
<a name="line73"></a>   * @private
<a name="line74"></a>   */
<a name="line75"></a>  this.description_ = opt_description;
<a name="line76"></a>
<a name="line77"></a>  /**
<a name="line78"></a>   * The mime type of the media.
<a name="line79"></a>   * @type {goog.ui.media.MediaModel.MimeType|undefined}
<a name="line80"></a>   * @private
<a name="line81"></a>   */
<a name="line82"></a>  this.type_ = opt_type;
<a name="line83"></a>
<a name="line84"></a>  /**
<a name="line85"></a>   * The medium of the media.
<a name="line86"></a>   * @type {goog.ui.media.MediaModel.Medium|undefined}
<a name="line87"></a>   * @private
<a name="line88"></a>   */
<a name="line89"></a>  this.medium_ = opt_medium;
<a name="line90"></a>
<a name="line91"></a>  /**
<a name="line92"></a>   * A list of thumbnails representations of the media (eg different sizes of
<a name="line93"></a>   * the same photo, etc).
<a name="line94"></a>   * @type {Array.&lt;goog.ui.media.MediaModel.Thumbnail&gt;}
<a name="line95"></a>   * @private
<a name="line96"></a>   */
<a name="line97"></a>  this.thumbnails_ = [];
<a name="line98"></a>
<a name="line99"></a>  /**
<a name="line100"></a>   * The list of categories that are applied to this media.
<a name="line101"></a>   * @type {Array.&lt;goog.ui.media.MediaModel.Category&gt;}
<a name="line102"></a>   * @private
<a name="line103"></a>   */
<a name="line104"></a>  this.categories_ = [];
<a name="line105"></a>};
<a name="line106"></a>
<a name="line107"></a>
<a name="line108"></a>/**
<a name="line109"></a> * The supported media mime types, a subset of the media types found here:
<a name="line110"></a> * {@link http://www.iana.org/assignments/media-types/} and here
<a name="line111"></a> * {@link http://en.wikipedia.org/wiki/Internet_media_type}
<a name="line112"></a> * @enum {string}
<a name="line113"></a> */
<a name="line114"></a>goog.ui.media.MediaModel.MimeType = {
<a name="line115"></a>  HTML: &#39;text/html&#39;,
<a name="line116"></a>  PLAIN: &#39;text/plain&#39;,
<a name="line117"></a>  FLASH: &#39;application/x-shockwave-flash&#39;,
<a name="line118"></a>  JPEG: &#39;image/jpeg&#39;,
<a name="line119"></a>  GIF: &#39;image/gif&#39;,
<a name="line120"></a>  PNG: &#39;image/png&#39;
<a name="line121"></a>};
<a name="line122"></a>
<a name="line123"></a>
<a name="line124"></a>/**
<a name="line125"></a> * Supported mediums, found here:
<a name="line126"></a> * {@link http://video.search.yahoo.com/mrss}
<a name="line127"></a> * @enum {string}
<a name="line128"></a> */
<a name="line129"></a>goog.ui.media.MediaModel.Medium = {
<a name="line130"></a>  IMAGE: &#39;image&#39;,
<a name="line131"></a>  AUDIO: &#39;audio&#39;,
<a name="line132"></a>  VIDEO: &#39;video&#39;,
<a name="line133"></a>  DOCUMENT: &#39;document&#39;,
<a name="line134"></a>  EXECUTABLE: &#39;executable&#39;
<a name="line135"></a>};
<a name="line136"></a>
<a name="line137"></a>
<a name="line138"></a>/**
<a name="line139"></a> * The media player.
<a name="line140"></a> * @type {goog.ui.media.MediaModel.Player}
<a name="line141"></a> * @private
<a name="line142"></a> */
<a name="line143"></a>goog.ui.media.MediaModel.prototype.player_;
<a name="line144"></a>
<a name="line145"></a>
<a name="line146"></a>/**
<a name="line147"></a> * Gets the URL of this media.
<a name="line148"></a> * @return {string|undefined} The URL of the media.
<a name="line149"></a> */
<a name="line150"></a>goog.ui.media.MediaModel.prototype.getUrl = function() {
<a name="line151"></a>  return this.url_;
<a name="line152"></a>};
<a name="line153"></a>
<a name="line154"></a>
<a name="line155"></a>/**
<a name="line156"></a> * Sets the URL of this media.
<a name="line157"></a> * @param {string} url The URL of the media.
<a name="line158"></a> * @return {goog.ui.media.MediaModel} The object itself, used for chaining.
<a name="line159"></a> */
<a name="line160"></a>goog.ui.media.MediaModel.prototype.setUrl = function(url) {
<a name="line161"></a>  this.url_ = url;
<a name="line162"></a>  return this;
<a name="line163"></a>};
<a name="line164"></a>
<a name="line165"></a>
<a name="line166"></a>/**
<a name="line167"></a> * Gets the caption of this media.
<a name="line168"></a> * @return {string|undefined} The caption of the media.
<a name="line169"></a> */
<a name="line170"></a>goog.ui.media.MediaModel.prototype.getCaption = function() {
<a name="line171"></a>  return this.caption_;
<a name="line172"></a>};
<a name="line173"></a>
<a name="line174"></a>
<a name="line175"></a>/**
<a name="line176"></a> * Sets the caption of this media.
<a name="line177"></a> * @param {string} caption The caption of the media.
<a name="line178"></a> * @return {goog.ui.media.MediaModel} The object itself, used for chaining.
<a name="line179"></a> */
<a name="line180"></a>goog.ui.media.MediaModel.prototype.setCaption = function(caption) {
<a name="line181"></a>  this.caption_ = caption;
<a name="line182"></a>  return this;
<a name="line183"></a>};
<a name="line184"></a>
<a name="line185"></a>
<a name="line186"></a>/**
<a name="line187"></a> * Gets the media mime type.
<a name="line188"></a> * @return {goog.ui.media.MediaModel.MimeType|undefined} The media mime type.
<a name="line189"></a> */
<a name="line190"></a>goog.ui.media.MediaModel.prototype.getType = function() {
<a name="line191"></a>  return this.type_;
<a name="line192"></a>};
<a name="line193"></a>
<a name="line194"></a>
<a name="line195"></a>/**
<a name="line196"></a> * Sets the media mime type.
<a name="line197"></a> * @param {goog.ui.media.MediaModel.MimeType} type The media mime type.
<a name="line198"></a> * @return {goog.ui.media.MediaModel} The object itself, used for chaining.
<a name="line199"></a> */
<a name="line200"></a>goog.ui.media.MediaModel.prototype.setType = function(type) {
<a name="line201"></a>  this.type_ = type;
<a name="line202"></a>  return this;
<a name="line203"></a>};
<a name="line204"></a>
<a name="line205"></a>
<a name="line206"></a>/**
<a name="line207"></a> * Gets the media medium.
<a name="line208"></a> * @return {goog.ui.media.MediaModel.Medium|undefined} The media medium.
<a name="line209"></a> */
<a name="line210"></a>goog.ui.media.MediaModel.prototype.getMedium = function() {
<a name="line211"></a>  return this.medium_;
<a name="line212"></a>};
<a name="line213"></a>
<a name="line214"></a>
<a name="line215"></a>/**
<a name="line216"></a> * Sets the media medium.
<a name="line217"></a> * @param {goog.ui.media.MediaModel.Medium} medium The media medium.
<a name="line218"></a> * @return {goog.ui.media.MediaModel} The object itself, used for chaining.
<a name="line219"></a> */
<a name="line220"></a>goog.ui.media.MediaModel.prototype.setMedium = function(medium) {
<a name="line221"></a>  this.medium_ = medium;
<a name="line222"></a>  return this;
<a name="line223"></a>};
<a name="line224"></a>
<a name="line225"></a>
<a name="line226"></a>/**
<a name="line227"></a> * Gets the description of this media.
<a name="line228"></a> * @return {string|undefined} The description of the media.
<a name="line229"></a> */
<a name="line230"></a>goog.ui.media.MediaModel.prototype.getDescription = function() {
<a name="line231"></a>  return this.description_;
<a name="line232"></a>};
<a name="line233"></a>
<a name="line234"></a>
<a name="line235"></a>/**
<a name="line236"></a> * Sets the description of this media.
<a name="line237"></a> * @param {string} description The description of the media.
<a name="line238"></a> * @return {goog.ui.media.MediaModel} The object itself, used for chaining.
<a name="line239"></a> */
<a name="line240"></a>goog.ui.media.MediaModel.prototype.setDescription = function(description) {
<a name="line241"></a>  this.description_ = description;
<a name="line242"></a>  return this;
<a name="line243"></a>};
<a name="line244"></a>
<a name="line245"></a>
<a name="line246"></a>/**
<a name="line247"></a> * Gets the thumbnail urls.
<a name="line248"></a> * @return {Array.&lt;goog.ui.media.MediaModel.Thumbnail&gt;} The list of thumbnails.
<a name="line249"></a> */
<a name="line250"></a>goog.ui.media.MediaModel.prototype.getThumbnails = function() {
<a name="line251"></a>  return this.thumbnails_;
<a name="line252"></a>};
<a name="line253"></a>
<a name="line254"></a>
<a name="line255"></a>/**
<a name="line256"></a> * Sets the thumbnail list.
<a name="line257"></a> * @param {Array.&lt;goog.ui.media.MediaModel.Thumbnail&gt;} thumbnails The list of
<a name="line258"></a> *     thumbnail.
<a name="line259"></a> * @return {goog.ui.media.MediaModel} The object itself, used for chaining.
<a name="line260"></a> */
<a name="line261"></a>goog.ui.media.MediaModel.prototype.setThumbnails = function(thumbnails) {
<a name="line262"></a>  this.thumbnails_ = thumbnails;
<a name="line263"></a>  return this;
<a name="line264"></a>};
<a name="line265"></a>
<a name="line266"></a>
<a name="line267"></a>/**
<a name="line268"></a> * Gets the player data.
<a name="line269"></a> * @return {goog.ui.media.MediaModel.Player|undefined} The media player data.
<a name="line270"></a> */
<a name="line271"></a>goog.ui.media.MediaModel.prototype.getPlayer = function() {
<a name="line272"></a>  return this.player_;
<a name="line273"></a>};
<a name="line274"></a>
<a name="line275"></a>
<a name="line276"></a>/**
<a name="line277"></a> * Sets the player data.
<a name="line278"></a> * @param {goog.ui.media.MediaModel.Player} player The media player data.
<a name="line279"></a> * @return {goog.ui.media.MediaModel} The object itself, used for chaining.
<a name="line280"></a> */
<a name="line281"></a>goog.ui.media.MediaModel.prototype.setPlayer = function(player) {
<a name="line282"></a>  this.player_ = player;
<a name="line283"></a>  return this;
<a name="line284"></a>};
<a name="line285"></a>
<a name="line286"></a>
<a name="line287"></a>/**
<a name="line288"></a> * Gets the categories of the media.
<a name="line289"></a> * @return {Array.&lt;goog.ui.media.MediaModel.Category&gt;} The categories of the
<a name="line290"></a> *     media.
<a name="line291"></a> */
<a name="line292"></a>goog.ui.media.MediaModel.prototype.getCategories = function() {
<a name="line293"></a>  return this.categories_;
<a name="line294"></a>};
<a name="line295"></a>
<a name="line296"></a>
<a name="line297"></a>/**
<a name="line298"></a> * Sets the categories of the media
<a name="line299"></a> * @param {Array.&lt;goog.ui.media.MediaModel.Category&gt;} categories The categories
<a name="line300"></a> *     of the media.
<a name="line301"></a> * @return {goog.ui.media.MediaModel} The object itself, used for chaining.
<a name="line302"></a> */
<a name="line303"></a>goog.ui.media.MediaModel.prototype.setCategories = function(categories) {
<a name="line304"></a>  this.categories_ = categories;
<a name="line305"></a>  return this;
<a name="line306"></a>};
<a name="line307"></a>
<a name="line308"></a>
<a name="line309"></a>/**
<a name="line310"></a> * Constructs a thumbnail containing details of the thumbnail&#39;s image URL and
<a name="line311"></a> * optionally it&#39;s size.
<a name="line312"></a> * @param {string} url The URL of the thumbnail&#39;s image.
<a name="line313"></a> * @param {goog.math.Size} opt_size The size of the thumbnail&#39;s image if known.
<a name="line314"></a> * @constructor
<a name="line315"></a> */
<a name="line316"></a>goog.ui.media.MediaModel.Thumbnail = function(url, opt_size) {
<a name="line317"></a>  /**
<a name="line318"></a>   * The thumbnail&#39;s image URL.
<a name="line319"></a>   * @type {string}
<a name="line320"></a>   * @private
<a name="line321"></a>   */
<a name="line322"></a>  this.url_ = url;
<a name="line323"></a>
<a name="line324"></a>  /**
<a name="line325"></a>   * The size of the thumbnail&#39;s image if known.
<a name="line326"></a>   * @type {goog.math.Size}
<a name="line327"></a>   * @private
<a name="line328"></a>   */
<a name="line329"></a>  this.size_ = opt_size || null;
<a name="line330"></a>};
<a name="line331"></a>
<a name="line332"></a>
<a name="line333"></a>/**
<a name="line334"></a> * Gets the thumbnail URL.
<a name="line335"></a> * @return {string} The thumbnail&#39;s image URL.
<a name="line336"></a> */
<a name="line337"></a>goog.ui.media.MediaModel.Thumbnail.prototype.getUrl = function() {
<a name="line338"></a>  return this.url_;
<a name="line339"></a>};
<a name="line340"></a>
<a name="line341"></a>
<a name="line342"></a>/**
<a name="line343"></a> * Sets the thumbnail URL.
<a name="line344"></a> * @param {string} url The thumbnail&#39;s image URL.
<a name="line345"></a> * @return {goog.ui.media.MediaModel.Thumbnail} The object itself, used for
<a name="line346"></a> *     chaining.
<a name="line347"></a> */
<a name="line348"></a>goog.ui.media.MediaModel.Thumbnail.prototype.setUrl = function(url) {
<a name="line349"></a>  this.url_ = url;
<a name="line350"></a>  return this;
<a name="line351"></a>};
<a name="line352"></a>
<a name="line353"></a>
<a name="line354"></a>/**
<a name="line355"></a> * Gets the thumbnail size.
<a name="line356"></a> * @return {goog.math.Size} The size of the thumbnail&#39;s image if known.
<a name="line357"></a> */
<a name="line358"></a>goog.ui.media.MediaModel.Thumbnail.prototype.getSize = function() {
<a name="line359"></a>  return this.size_;
<a name="line360"></a>};
<a name="line361"></a>
<a name="line362"></a>
<a name="line363"></a>/**
<a name="line364"></a> * Sets the thumbnail size.
<a name="line365"></a> * @param {goog.math.Size} size The size of the thumbnail&#39;s image.
<a name="line366"></a> * @return {goog.ui.media.MediaModel.Thumbnail} The object itself, used for
<a name="line367"></a> *     chaining.
<a name="line368"></a> */
<a name="line369"></a>goog.ui.media.MediaModel.Thumbnail.prototype.setSize = function(size) {
<a name="line370"></a>  this.size_ = size;
<a name="line371"></a>  return this;
<a name="line372"></a>};
<a name="line373"></a>
<a name="line374"></a>
<a name="line375"></a>/**
<a name="line376"></a> * Constructs a player containing details of the player&#39;s URL and
<a name="line377"></a> * optionally it&#39;s size.
<a name="line378"></a> * @param {string} url The URL of the player.
<a name="line379"></a> * @param {Object} opt_vars Optional map of arguments to the player.
<a name="line380"></a> * @param {goog.math.Size} opt_size The size of the player if known.
<a name="line381"></a> * @constructor
<a name="line382"></a> */
<a name="line383"></a>goog.ui.media.MediaModel.Player = function(url, opt_vars, opt_size) {
<a name="line384"></a>  /**
<a name="line385"></a>   * The player&#39;s URL.
<a name="line386"></a>   * @type {string}
<a name="line387"></a>   * @private
<a name="line388"></a>   */
<a name="line389"></a>  this.url_ = url;
<a name="line390"></a>
<a name="line391"></a>  /**
<a name="line392"></a>   * Player arguments, typically flash arguments.
<a name="line393"></a>   * @type {Object}
<a name="line394"></a>   * @private
<a name="line395"></a>   */
<a name="line396"></a>  this.vars_ = opt_vars || null;
<a name="line397"></a>
<a name="line398"></a>  /**
<a name="line399"></a>   * The size of the player if known.
<a name="line400"></a>   * @type {goog.math.Size}
<a name="line401"></a>   * @private
<a name="line402"></a>   */
<a name="line403"></a>  this.size_ = opt_size || null;
<a name="line404"></a>};
<a name="line405"></a>
<a name="line406"></a>
<a name="line407"></a>/**
<a name="line408"></a> * Gets the player url.
<a name="line409"></a> * @return {string} The thumbnail&#39;s image URL.
<a name="line410"></a> */
<a name="line411"></a>goog.ui.media.MediaModel.Player.prototype.getUrl = function() {
<a name="line412"></a>  return this.url_;
<a name="line413"></a>};
<a name="line414"></a>
<a name="line415"></a>
<a name="line416"></a>/**
<a name="line417"></a> * Sets the player url.
<a name="line418"></a> * @param {string} url The thumbnail&#39;s image URL.
<a name="line419"></a> * @return {goog.ui.media.MediaModel.Player} The object itself, used for
<a name="line420"></a> *     chaining.
<a name="line421"></a> */
<a name="line422"></a>goog.ui.media.MediaModel.Player.prototype.setUrl = function(url) {
<a name="line423"></a>  this.url_ = url;
<a name="line424"></a>  return this;
<a name="line425"></a>};
<a name="line426"></a>
<a name="line427"></a>
<a name="line428"></a>/**
<a name="line429"></a> * Gets the player arguments.
<a name="line430"></a> * @return {Object} The media player arguments.
<a name="line431"></a> */
<a name="line432"></a>goog.ui.media.MediaModel.Player.prototype.getVars = function() {
<a name="line433"></a>  return this.vars_;
<a name="line434"></a>};
<a name="line435"></a>
<a name="line436"></a>
<a name="line437"></a>/**
<a name="line438"></a> * Sets the player arguments.
<a name="line439"></a> * @param {Object} vars The media player arguments.
<a name="line440"></a> * @return {goog.ui.media.MediaModel.Player} The object itself, used for
<a name="line441"></a> *     chaining.
<a name="line442"></a> */
<a name="line443"></a>goog.ui.media.MediaModel.Player.prototype.setVars = function(vars) {
<a name="line444"></a>  this.vars_ = vars;
<a name="line445"></a>  return this;
<a name="line446"></a>};
<a name="line447"></a>
<a name="line448"></a>
<a name="line449"></a>/**
<a name="line450"></a> * Gets the size of the player.
<a name="line451"></a> * @return {goog.math.Size} The size of the player if known.
<a name="line452"></a> */
<a name="line453"></a>goog.ui.media.MediaModel.Player.prototype.getSize = function() {
<a name="line454"></a>  return this.size_;
<a name="line455"></a>};
<a name="line456"></a>
<a name="line457"></a>
<a name="line458"></a>/**
<a name="line459"></a> * Sets the size of the player.
<a name="line460"></a> * @param {goog.math.Size} size The size of the player.
<a name="line461"></a> * @return {goog.ui.media.MediaModel.Player} The object itself, used for
<a name="line462"></a> *     chaining.
<a name="line463"></a> */
<a name="line464"></a>goog.ui.media.MediaModel.Player.prototype.setSize = function(size) {
<a name="line465"></a>  this.size_ = size;
<a name="line466"></a>  return this;
<a name="line467"></a>};
<a name="line468"></a>
<a name="line469"></a>
<a name="line470"></a>/**
<a name="line471"></a> * A taxonomy to be set that gives an indication of the type of media content,
<a name="line472"></a> * and its particular contents.
<a name="line473"></a> * @param {string} scheme The URI that identifies the categorization scheme.
<a name="line474"></a> * @param {string} value The value of the category.
<a name="line475"></a> * @param {string} opt_label The human readable label that can be displayed in
<a name="line476"></a> *     end user applications.
<a name="line477"></a> * @constructor
<a name="line478"></a> */
<a name="line479"></a>goog.ui.media.MediaModel.Category = function(scheme, value, opt_label) {
<a name="line480"></a>  /**
<a name="line481"></a>   * The URI that identifies the categorization scheme.
<a name="line482"></a>   * @type {string}
<a name="line483"></a>   * @private
<a name="line484"></a>   */
<a name="line485"></a>  this.scheme_ = scheme;
<a name="line486"></a>
<a name="line487"></a>  /**
<a name="line488"></a>   * The value of the category.
<a name="line489"></a>   * @type {string}
<a name="line490"></a>   * @private
<a name="line491"></a>   */
<a name="line492"></a>  this.value_ = value;
<a name="line493"></a>
<a name="line494"></a>  /**
<a name="line495"></a>   * The human readable label that can be displayed in end user applications.
<a name="line496"></a>   * @type {string}
<a name="line497"></a>   * @private
<a name="line498"></a>   */
<a name="line499"></a>  this.label_ = opt_label || &#39;&#39;;
<a name="line500"></a>};
<a name="line501"></a>
<a name="line502"></a>
<a name="line503"></a>/**
<a name="line504"></a> * Gets the category scheme.
<a name="line505"></a> * @return {string} The category scheme URI.
<a name="line506"></a> */
<a name="line507"></a>goog.ui.media.MediaModel.Category.prototype.getScheme = function() {
<a name="line508"></a>  return this.scheme_;
<a name="line509"></a>};
<a name="line510"></a>
<a name="line511"></a>
<a name="line512"></a>/**
<a name="line513"></a> * Sets the category scheme.
<a name="line514"></a> * @param {string} scheme The category&#39;s scheme.
<a name="line515"></a> * @return {goog.ui.media.MediaModel.Category} The object itself, used for
<a name="line516"></a> *     chaining.
<a name="line517"></a> */
<a name="line518"></a>goog.ui.media.MediaModel.Category.prototype.setScheme = function(scheme) {
<a name="line519"></a>  this.scheme_ = scheme;
<a name="line520"></a>  return this;
<a name="line521"></a>};
<a name="line522"></a>
<a name="line523"></a>
<a name="line524"></a>/**
<a name="line525"></a> * Gets the categor&#39;s value.
<a name="line526"></a> * @return {string} The category&#39;s value.
<a name="line527"></a> */
<a name="line528"></a>goog.ui.media.MediaModel.Category.prototype.getValue = function() {
<a name="line529"></a>  return this.value_;
<a name="line530"></a>};
<a name="line531"></a>
<a name="line532"></a>
<a name="line533"></a>/**
<a name="line534"></a> * Sets the category value.
<a name="line535"></a> * @param {string} value The category value to be set.
<a name="line536"></a> * @return {goog.ui.media.MediaModel.Category} The object itself, used for
<a name="line537"></a> *     chaining.
<a name="line538"></a> */
<a name="line539"></a>goog.ui.media.MediaModel.Category.prototype.setValue = function(value) {
<a name="line540"></a>  this.value_ = value;
<a name="line541"></a>  return this;
<a name="line542"></a>};
<a name="line543"></a>
<a name="line544"></a>
<a name="line545"></a>/**
<a name="line546"></a> * Gets the label of the category.
<a name="line547"></a> * @return {string} The label of the category.
<a name="line548"></a> */
<a name="line549"></a>goog.ui.media.MediaModel.Category.prototype.getLabel = function() {
<a name="line550"></a>  return this.label_;
<a name="line551"></a>};
<a name="line552"></a>
<a name="line553"></a>
<a name="line554"></a>/**
<a name="line555"></a> * Sets the label of the category.
<a name="line556"></a> * @param {string} label The label of the category.
<a name="line557"></a> * @return {goog.ui.media.MediaModel.Category} The object itself, used for
<a name="line558"></a> *     chaining.
<a name="line559"></a> */
<a name="line560"></a>goog.ui.media.MediaModel.Category.prototype.setLabel = function(label) {
<a name="line561"></a>  this.label_ = label;
<a name="line562"></a>  return this;
<a name="line563"></a>};
</pre>


</body>
</html>
